import { request } from "@/utils/request";

/**
 * 获取所有标签
 * @param start
 * @param size
 * @returns
 */
export const getalllabelmanapi = (
  start: number,
  size: number,
  search: string
) => {
  return request.get(
    `/label/getalllabelman?start=${start}&size=${size}&search=${search}`
  );
};

/**
 * 删除标签
 * @param id
 * @returns
 */
export const deleteoneapi = (id: number) => {
  return request.delete(`/label/deleteone/${id}`);
};

/**
 * 添加标签
 * @param content ;
 * @param id
 * @returns
 */
export const addlabelapi = (content: string) => {
  return request.post("/label/addlabel", { content });
};

/**
 * 编辑标签
 * @param content : ;
 * @param id
 * @returns
 */
export const editlabelapi = (content: string, id: number) => {
  return request.patch("/label/editlabel", { content, id });
};
